<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/4/25
 * Time: 10:02
 */
namespace app\validate;
class RuleValidate{
    protected $rule = [
        'name'  => 'unique:auth_rule',
        'title' => 'require|unique:auth_rule',
    ];
    protected $message = [
        'name.unique'    => '验证规则重复',
        'title.require'  => '权限名称不能为空',
        'title.unique'   => '权限名称重复'
    ];
    public function ruleValidate(){
        $validate['rule']    = $this->rule;
        $validate['message'] = $this->message;
        return $validate;
    }
}